package sush.global.cammail;

import android.content.Intent;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.Preference.OnPreferenceClickListener;
import android.preference.PreferenceActivity;

public class SettingsActivity extends PreferenceActivity {
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		addPreferencesFromResource(R.xml.preferences);
		
		Preference templatePref = (Preference)findPreference(getResources().getString(R.string.templates_pref));
		templatePref.setOnPreferenceClickListener(onTemplatesClickListener);
	}
	
	private OnPreferenceClickListener onTemplatesClickListener = new OnPreferenceClickListener() {
		@Override
		public boolean onPreferenceClick(Preference preference) {
			Intent intent = new Intent(SettingsActivity.this, TemplatesActivity.class);
			startActivity(intent);
			return true;
		}
	};
}
